<?php // Do not delete these lines
	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

        if (!empty($post->post_password)) { // if there's a password
            if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
				?>
				
				<p class="nocomments">This post is password protected. Enter the password to view comments.<p>
				
				<?php
				return;
            }
        }

?>

<?php if ($comments) : ?>

<div id="comments">
	<h6><?php comments_number('000 Responses', '1 Response', '% Responses' );?></h6> 
</div>

	<?php $comment_counter = 1 ?>

	<?php foreach ($comments as $comment) : ?>

		<div class="comment" id="comment-<?php comment_ID() ?>"><?php if(function_exists('cmd_show_avatar')) cmd_show_avatar(); ?>
			<h3><?php echo zeroise("$comment_counter", 3); ?><?php $comment_counter = $comment_counter + 1; ?>: <?php comment_author_link() ?>,</h3>
			<?php if ($comment->comment_approved == '0') : ?>
			<div align="center"><strong>Your comment is awaiting moderation.</strong></div>
			<?php endif; ?>
			<small class="comm-date"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?></small>

			<div class="comm-entry"><?php comment_text() ?></div>

		</div>

	<?php endforeach; /* end for each comment */ ?>

 <?php else : // this is displayed if there are no comments so far ?>

  <?php if ('open' == $post->comment_status) : ?> 
		<!-- If comments are open, but there are no comments. -->
		
	 <?php else : // comments are closed ?>
		<!-- If comments are closed. -->
		<p class="nocomments">Comments are closed.</p>

	<?php endif; ?>

<?php endif; ?>


<?php if ('open' == $post->comment_status) : ?>

<p id="respond">&nbsp;</p>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<?php if ( $user_ID ) : ?>

<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>
<table border="0" cellpadding="1" cellspacing="4" align="center" width="95%">

<?php else : ?>

<p>You are currently not logged into an account. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php" title="Log in to your account">Login &raquo;</a></p>
<table border="0" cellpadding="1" cellspacing="4" align="center" width="95%">

	  <tr>
		<td width="50%">
		  <label for="author">Name</label><br />
		  <center><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" tabindex="1" /></center>
		</td>

		<td width="50%">
		  <label for="email">Email</label><br />
		  <center><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" /></center>
		</td>
	  </tr>

	  <tr>
		<td colspan="2">
		  <label for="url">Website URL:</label><br />
		  <center><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" tabindex="3" /></center>
		</td>
	  </tr>

<?php endif; ?>

	  <tr>
		<td colspan="2">
		  <label for="comment">Message:</label><br />
		  <center><textarea name="comment" id="comment" rows="10" cols="" tabindex="4"></textarea></center>
		</td>
	  </tr>

	  <tr>
		<td colspan="2">
		  <center><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></center>
		</td>
	  </tr>

<?php do_action('comment_form', $post->ID); ?>

</table>

</form>

<?php endif; ?>

<?php endif; ?>